package com.uphone.mvpdemo.http;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * Created by hzy on 2019/1/10
 * ApiService
 *
 * @author Administrator
 */
public interface ApiService {

    // 服务器url
    public final static String ServiceUrl = "http://www.uphonechina.com:8031/index.php/mobile/";

    @Multipart
    @POST("user/highScoreUpload")
    Observable<ResponseBody> userHightScoreUpload(@PartMap Map<String, RequestBody> params,
                                                  @Part MultipartBody.Part file);

    @POST()
    Observable<ResponseBody> postService(@Url String url, @Body RequestBody params);

    @POST("movie/subject")
    Observable<ResponseBody> getMovieDetail();
}
